 
<div class="mws-panel grid_8 mws-collapsible  exams">
  <div class="mws-panel-header">
     <span class="mws-i-24 i-table-1"><?php  echo __('Exam'); ?></span>
   <div class="mws-collapse-button mws-inset"><span></span></div>
 </div>
<div class="mws-panel-body" style="display: block; direction:rtl;">
  <div class="right_direction"> 
  <table class="mws-table">
      <tbody>
		<tr><td class="left_header"><?php echo __('Id'); ?></td>
		<td>
			<?php echo h($exam['Exam']['id']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Periodexam'); ?></td>
		<td>
			<?php echo $this->Html->link($exam['Periodexam']['name'], array('controller' => 'periodexams', 'action' => 'view', $exam['Periodexam']['id'])); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Subject'); ?></td>
		<td>
			<?php echo $this->Html->link($exam['Subject']['name'], array('controller' => 'subjects', 'action' => 'view', $exam['Subject']['id'])); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('In Date'); ?></td>
		<td>
			<?php echo h($exam['Exam']['in_date']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Emark Limit'); ?></td>
		<td>
			<?php echo h($exam['Exam']['emark_limit']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Emark Success'); ?></td>
		<td>
			<?php echo h($exam['Exam']['emark_success']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('User'); ?></td>
		<td>
			<?php echo $this->Html->link($exam['User']['id'], array('controller' => 'users', 'action' => 'view', $exam['User']['id'])); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Created'); ?></td>
		<td>
			<?php echo h($exam['Exam']['created']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Modified'); ?></td>
		<td>
			<?php echo h($exam['Exam']['modified']); ?>
			&nbsp;
		</td></tr>
	</tbody>
	</table>
</div>
</div>

<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Exam'), array('action' => 'edit', $exam['Exam']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Exam'), array('action' => 'delete', $exam['Exam']['id']), null, __('Are you sure you want to delete # %s?', $exam['Exam']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Exams'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Exam'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Periodexams'), array('controller' => 'periodexams', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Periodexam'), array('controller' => 'periodexams', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Subjects'), array('controller' => 'subjects', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Subject'), array('controller' => 'subjects', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Resultexams'), array('controller' => 'resultexams', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Resultexam'), array('controller' => 'resultexams', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Resultexams'); ?></h3>
	<?php if (!empty($exam['Resultexam'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Exam Id'); ?></th>
		<th><?php echo __('Student Id'); ?></th>
		<th><?php echo __('Oral Mark'); ?></th>
		<th><?php echo __('Written Mark'); ?></th>
		<th><?php echo __('Midterm Mark'); ?></th>
		<th><?php echo __('Practical Mark'); ?></th>
		<th><?php echo __('Total Marks'); ?></th>
		<th><?php echo __('Upgrade Mark'); ?></th>
		<th><?php echo __('Final Mark'); ?></th>
		<th><?php echo __('Result'); ?></th>
		<th><?php echo __('Attend'); ?></th>
		<th><?php echo __('Accept'); ?></th>
		<th><?php echo __('User Id'); ?></th>
		<th><?php echo __('Created'); ?></th>
		<th><?php echo __('Modified'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($exam['Resultexam'] as $resultexam): ?>
		<tr>
			<td><?php echo $resultexam['id']; ?></td>
			<td><?php echo $resultexam['exam_id']; ?></td>
			<td><?php echo $resultexam['student_id']; ?></td>
			<td><?php echo $resultexam['oral_mark']; ?></td>
			<td><?php echo $resultexam['written_mark']; ?></td>
			<td><?php echo $resultexam['midterm_mark']; ?></td>
			<td><?php echo $resultexam['practical_mark']; ?></td>
			<td><?php echo $resultexam['total_marks']; ?></td>
			<td><?php echo $resultexam['upgrade_mark']; ?></td>
			<td><?php echo $resultexam['final_mark']; ?></td>
			<td><?php echo $resultexam['result']; ?></td>
			<td><?php echo $resultexam['attend']; ?></td>
			<td><?php echo $resultexam['accept']; ?></td>
			<td><?php echo $resultexam['user_id']; ?></td>
			<td><?php echo $resultexam['created']; ?></td>
			<td><?php echo $resultexam['modified']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'resultexams', 'action' => 'view', $resultexam['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'resultexams', 'action' => 'edit', $resultexam['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'resultexams', 'action' => 'delete', $resultexam['id']), null, __('Are you sure you want to delete # %s?', $resultexam['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Resultexam'), array('controller' => 'resultexams', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
